<?php


namespace app\admin\service;


use app\admin\model\Allian;
use app\admin\model\Applet;

use think\facade\Db;

class AllianService extends BaseService
{

    public function __construct()
    {
        $this->model = new Allian();
    }

    public function getUserInfo()
    {
        $info = Db::name('allian')->where('id', '=', 1)->find();


        return message("操作成功", true, $info);
    }

    public function updateUserInfo()
    {


        // 参数
        $param = request()->param();

        // 个人信息
        $data = [
            'brief' => $param['brief'],
            'content' => $param['content'],


        ];
        $info = Db::name('allian')->where('id', '=', 1)->find();
        $data['id'] = $info['id'];
        $result = $this->model->edit($data);
        if (!$result) {
            return message("更新资料信息失败", false);
        }
        return message("更新资料信息成功");
    }
}